<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>表单组合</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__PUBLIC__/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">订单发货</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="component-form-group">
                <div class="layui-form-item">
                    <label class="layui-form-label">流水号:</label>
                    <div class="layui-input-block" style="padding-top: 7px;">
                        {$find.or_batch}
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">收件人:</label>
                    <div class="layui-input-block" style="padding-top: 6px;">
                        {$find.ad_name}&nbsp;&nbsp;&nbsp;&nbsp;{$find.ad_phone}
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">收件地址:</label>
                    <div class="layui-input-block" style="padding-top: 6px;">
                        {$find.ad_area}{$find.ad_addre}
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">流水号</label>
                    <div class="layui-input-block" style="padding-top: 7px;">
                        {$find.or_batch}
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">选择物流</label>
                        <div class="layui-input-inline">
                            <select name="modules" id="modules" lay-verify="required" lay-search="">
                                {volist name='courier' id='vo'}
                                <option value="{$key+1}">{$vo.0}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">物流单号</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" id="number" lay-verify="title" autocomplete="off" placeholder="请填写快递单号" class="layui-input">
                    </div>
                </div>
                <input type="hidden" id="orId" value="{$find.or_id}">
                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button type="button" class="layui-btn" lay-filter="component-form-demo1">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


<script src="__PUBLIC__/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['form', 'layer'], function() {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate;

        form.render(null, 'component-form-group');

        laydate.render({
            elem: '#LAY-component-form-group-date'
        });
    });
    function sub()
    {
        //获取相关的值
        var modules = $("#modules").val();
        var number = $("#number").val();
        var orId = $("#orId").val();
        $.ajax({
            type:'post',
            url:'{:url("Order/orderHair")}',
            data:{modules:modules,number:number,id:orId},
            success: function (data) {
                if(data.code>0){
                    layer.msg(data.msg,{icon:1,time:1500});
                    setTimeout(function(){parent.location.reload()},1500);
                }else{
                    layer.msg(data.msg,{icon:5,time:1500});
                }
            },
        });
    }
</script>
</body>
</html>
